package cn.pomit.springbootwork.consulclient.service;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

@Configuration
@ConfigurationProperties(prefix="user")
@PropertySource("classpath:config/user.properties")
public class UserConfig {

	private String userName;

	private String realName;

	private Integer mobile;

	@Value("${hello.message}")
	private String message;

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	public Integer getMobile() {
		return mobile;
	}

	public void setMobile(Integer mobile) {
		this.mobile = mobile;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	@Override
	public String toString() {
		return "UserConfig [userName=" + userName + ", realName=" + realName + ", mobile=" + mobile + ", message="
				+ message + "]";
	}

}
